#!/usr/bin/python2.4
#
# Copyright 2011 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.


"""Handler for the server's landing page.

The landing page provides no content and is intended to keep a user from
receiving a 404 when typing in the base url of the server.  In the future
statistics and other layer related information may be provided.

  LandingPage: The RequestHandler for the landing page.
"""

__author__ = 'jasonstredwick@google.com (Jason Stredwick)'


try:
  from google.appengine.ext import webapp
  from google.appengine.ext.webapp.util import run_wsgi_app
except ImportError:
  # For unit testing.
  from google.appengine.ext import webapp
  from google.appengine.ext.webapp.util import run_wsgi_app



class LandingPage(webapp.RequestHandler):
  """Handles get requests for the server's landing page."""

  def get(self):
    """Handles a get request for this page."""
    self.response.out.write('')

  def post(self):
    """Handles a post request for this page."""
    self.get()


def main():
  """Specifies which relative urls this request handler can handle."""

  application = webapp.WSGIApplication([('/', LandingPage)],
                                       debug=True)
  run_wsgi_app(application)

  return


if __name__ == '__main__':
  main()

